package cn.pfund.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.springframework.web.multipart.MultipartFile;

 /**
 *新闻管理
 * @author zhaominglei qq:351024274，专注于网站、app和游戏开发。
 * @date 2017年1月20日
 */
@Entity
@Table(name="pfund_news")
public class News extends BaseEntity implements Serializable {
	private static final long serialVersionUID = -897658209480549678L;
	/** 新闻类别 **/
	private NewsType newsType;
	/** 标题 **/
	private String title;
	/** 原图片 **/
	private String source;
	/** 介绍 **/
	private String introduction;
	/** 来源 **/
	private String fromwho;
	/** 内容 **/
	private String content;
	/** 文件 */
	private MultipartFile file;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="news_type_id")
	public NewsType getNewsType() {
		return newsType;
	}
	public void setNewsType(NewsType newsType) {
		this.newsType = newsType;
	}
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
	public String getIntroduction() {
		return introduction;
	}
	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}
	public String getFromwho() {
		return fromwho;
	}
	public void setFromwho(String fromwho) {
		this.fromwho = fromwho;
	}
	@Column(columnDefinition="LONGTEXT")
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	@Transient
	public MultipartFile getFile() {
		return file;
	}
	public void setFile(MultipartFile file) {
		this.file = file;
	}
}
